<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            border: 1px dashed #333;
            padding: 10px;
        }

        /* 边框透明 */
        input {
            /* transparent 透明色 */
            /* border: 1px solid transparent; */
            border: 1px solid blueviolet;
            /* 去掉轮廓线 */
            outline: none;
            width: 200px;
            /* 过渡 */
            transition: all 1s;
        }

        input:focus {
            width: 500px;
        }
    </style>
</head>

<body>
    <div class="box">
        <input type="text">
    </div>
</body>

</html>